package cool.doudou.doudada.message.config;

import cool.doudou.doudada.message.core.api.AliApi;
import cool.doudou.doudada.message.core.api.WxApi;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;

/**
 * MessageConfig
 *
 * @author jiangcs
 * @since 2022/08/25
 */
public class MessageConfig {
    @ConditionalOnProperty(value = "message.ali.enabled")
    @Bean
    public AliApi aliApi() {
        return new AliApi();
    }

    @ConditionalOnProperty(value = "message.wx.enabled")
    @Bean
    public WxApi wxApi() {
        return new WxApi();
    }
}
